<template>
	<view class="page">

		<block v-if="playStatus==0">
			<top-detail></top-detail>
			<view class="check">
				<view class="check_title">
					<image src="../../static/img/icon1.png" alt="">
						<text>检查项</text>
				</view>
				<view class="check_type1">
					<view class="">
						外观/组件完好无损
					</view>
					<view class="">

					</view>
				</view>
				<view class="check_type1">
					<view class="">
						工作状态/启闭灵活
					</view>
				</view>
			</view>
			<view class="ful">
				<view class="ful_left">
					描述
				</view>
				<view class="ful_right">

				</view>
			</view>
			<view class="ful">
				<view class="ful_left">
					图片
				</view>
				<view class="ful_right">

				</view>
			</view>
			
			
			<view class="ful">
				<view class="ful_left">
					报单单位
				</view>
				<view class="ful_right">
			
				</view>
			</view>	
			<view class="ful">
				<view class="ful_left">
					操作人员
				</view>
				<view class="ful_right">
			
				</view>
			</view>	
			<view class="ful">
				<view class="ful_left">
					报单时间
				</view>
				<view class="ful_right">
			
				</view>
			</view>
			<view class="remarks">
				时间紧急，请工程师一天之内完成
			</view>
			<view class="btn btn_agree" @tap="agreeOrder">
				同意
			</view>
			<view class="btn btn_refuse" @tap="refuseOrder">
				拒绝
			</view>


		</block>
		<block v-else-if="playStatus==1">
			<view class="success">
				<img src="/static/img/icon3.png" alt="">
				<text>接单成功</text>
			</view>
			<view class="btn_success">
				<view class="left_btn" @tap="backList">
					返回工单列表
				</view>
				<view class="right_btn" @tap="backDetail">
					返回工单中心
				</view>
			</view>
		</block>
		<block v-else-if="playStatus==2">
			<explain-card title="拒接说明" tips="输入说明内容"  v-model='content'></explain-card>
			<view class="btn_submit">
				提交
			</view>
		</block>
	</view>
</template>

<script>
	import explainCard from '@/components/explain_card.vue'
	import topDetail from '@/components/top_detail.vue'
	export default {
		components:{
			topDetail,
			explainCard
		},
		data() {
			return {
				//0工单详情  1同意工单   2拒绝工单
				playStatus: 0,
				//拒绝内容
				content:""
			}
		},
		methods: {
			//返回工单列表
			backList(){
				uni.switchTab({
					url:'.../index/index'
				})
			},
			//返回工单中心
			backDetail(){
				this.playStatus = 0
			},
			//同意工单
			agreeOrder() {
				this.playStatus = 1
			},
			//拒绝工单
			refuseOrder() {
				this.playStatus = 2
			}
		}
	}
</script>

<style lang="scss" scoped>
	.btn_submit{
		height: 92rpx;
		background: #4252CD;
		border-radius: 46rpx;
		font-size: 28rpx;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: 500;
		color: #FFFFFF;
		line-height: 92rpx;
		margin-top: 78rpx;
		text-align: center;
	}
	
	
	.btn_success{
		display: flex;
		text-align: center;
		justify-content: space-between;
		margin-top: 350rpx;
		.left_btn{
		width: 320rpx;
		height: 92rpx;
		background: #4252CD;
		border-radius: 46rpx;
		font-size: 28rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #FFFFFF;
		line-height: 92rpx;
		}
		
		.right_btn{
			width: 320rpx;
			height: 92rpx;
			background: #FFFFFF;
			border-radius: 46rpx;
			border: 2rpx solid #4252CD;
			font-size: 28rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #4252CD;
			line-height: 92rpx;
		}
	}
	.success{
		display: flex;
		flex-direction: column;
		align-items: center;
		box-sizing: border-box;
		padding-top: 354rpx;
		image{
			width: 154rpx;
			height: 154rpx;
		}
		text{
			font-size: 32rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #4252CD;
			line-height: 44rpx;
			margin-top: 30rpx;
		}
	}
	.remarks{
		margin-top: 30rpx;
		min-height: 194rpx;
		background: #F9F9F9;
		border-radius: 20rpx;
		padding: 30rpx 20rpx;
		font-size: 28rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #7F8084;
		line-height: 40rpx;
	}
	.btn {
		height: 92rpx;
		background: #4252CD;
		border-radius: 46rpx;
		font-size: 28rpx;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: 500;
		color: #FFFFFF;
		line-height: 92rpx;
		text-align: center;
	}

	.btn_agree {
		margin-top: 88rpx;
		margin-bottom: 30rpx;
	}

	.btn_refuse {
		background: #FFFFFF;
		border-radius: 46rpx;
		opacity: 0.59;
		border: 2rpx solid #4252CD;
		color: #4252CD;
		margin-bottom: 50rpx;
	}

	.page {
		box-sizing: border-box;
		padding: 0 30rpx;
	}

	.check {
		padding: 30rpx 0;
		font-size: 28rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #7F8084;
		line-height: 40rpx;
		border-bottom: 2rpx solid #EFEFEF;

		.check_title {
			image {
				width: 20rpx;
				height: 28rpx;
				vertical-align: inherit;
				margin-right: 10rpx;
			}
		}

		.check_type1 {
			margin-left: 30rpx;
			margin-top: 20rpx;
		}
	}

	.ful {
		padding: 30rpx 0;
		box-sizing: border-box;
		font-size: 28rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		line-height: 40rpx;
		border-bottom: 2rpx solid #EFEFEF;

		.ful_left {
			color: #7F8084;
		}

		.ful_right {
			color: #474747;
		}
	}
</style>
